﻿<phone:PhoneApplicationPage
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
	xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
	xmlns:controls="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls"
	xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
	xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
	xmlns:local="clr-namespace:FakeMarketplace"
	mc:Ignorable="d" d:DesignWidth="480" d:DesignHeight="800" 
	x:Class="FakeMarketplace.MainPage"
	SupportedOrientations="Portrait" Orientation="Portrait"
	shell:SystemTray.IsVisible="False">
	<phone:PhoneApplicationPage.Resources>
		<Style x:Key="StartupButtonStyle" TargetType="Button">
			<Setter Property="Background" Value="Transparent"/>
			<Setter Property="BorderBrush" Value="{StaticResource PhoneForegroundBrush}"/>
			<Setter Property="Foreground" Value="{StaticResource PhoneForegroundBrush}"/>
			<Setter Property="BorderThickness" Value="{StaticResource PhoneBorderThickness}"/>
			<Setter Property="FontFamily" Value="{StaticResource PhoneFontFamilySemiBold}"/>
			<Setter Property="FontSize" Value="{StaticResource PhoneFontSizeMediumLarge}"/>
			<Setter Property="Padding" Value="10,3,10,5"/>
			<Setter Property="Template">
				<Setter.Value>
					<ControlTemplate TargetType="Button">
						<Grid Background="Transparent">
							<VisualStateManager.VisualStateGroups>
								<VisualStateGroup x:Name="CommonStates">
									<VisualState x:Name="Normal"/>
									<VisualState x:Name="MouseOver"/>
									<VisualState x:Name="Pressed"/>
									<VisualState x:Name="Disabled"/>
								</VisualStateGroup>
							</VisualStateManager.VisualStateGroups>
							<ContentControl x:Name="ContentContainer" ContentTemplate="{TemplateBinding ContentTemplate}" Content="{TemplateBinding Content}" Foreground="White" HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" Padding="{TemplateBinding Padding}" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}" HorizontalAlignment="Left" FontFamily="Segoe WP SemiLight" FontSize="48"/>
						</Grid>
					</ControlTemplate>
				</Setter.Value>
			</Setter>
		</Style>
	</phone:PhoneApplicationPage.Resources>
	<phone:PhoneApplicationPage.ApplicationBar>
		<shell:ApplicationBar Opacity="0.85" ForegroundColor="Transparent" BackgroundColor="Black">
			<shell:ApplicationBarIconButton IconUri="/icons/appbar.feature.search.rest.png" IsEnabled="True" Text="search"/>
		</shell:ApplicationBar>
	</phone:PhoneApplicationPage.ApplicationBar>

	<!--LayoutRoot is the root grid where all page content is placed-->
	<Grid x:Name="LayoutRoot" Background="Black">

		<!--Panorama control-->
		<controls:Panorama Title="marketplace" Foreground="White">
			<controls:Panorama.Background>
				<ImageBrush Opacity="0.4" ImageSource="/MyApp/BackgroundArt.png"/>
			</controls:Panorama.Background>

			<!--Panorama item one-->
			<controls:PanoramaItem Header="">
			<StackPanel Margin="0,-8,0,0">
				<Button Content="apps" Style="{StaticResource StartupButtonStyle}" Click="Button_Click"/>
				<Button Content="games" Style="{StaticResource StartupButtonStyle}"/>
				<Button Content="music" Style="{StaticResource StartupButtonStyle}"/>
			</StackPanel>
			</controls:PanoramaItem>

			<!--Panorama item two-->
			<controls:PanoramaItem Header="apps">
				<!--Double line list with image placeholder and text wrapping-->
				<Grid>
					<StackPanel >
                        <local:AppDisplayControl DataContext="{Binding Apps[0]}" Subtitle="{Binding Subtitle}" Margin="0,0,0,12" Tap="AppDisplayControl_Tap" />
                        <local:AppDisplayControl  DataContext="{Binding Apps[1]}" Subtitle="{Binding Subtitle}" Margin="0,0,0,12" />
                        <local:AppDisplayControl DataContext="{Binding Apps[2]}" Subtitle="{Binding Subtitle}" />
					</StackPanel>
					<TextBlock Text="all apps" VerticalAlignment="Bottom" Foreground="White" FontSize="42.667" Margin="12,0,0,76" FontFamily="Segoe WP SemiLight"/>
				</Grid>
			</controls:PanoramaItem>
			<controls:PanoramaItem Header="">
				<StackPanel Orientation="Vertical" VerticalAlignment="Top" Tap="AppDisplayControl_Tap" Margin="0,24,0,0">
			<TextBlock HorizontalAlignment="Left" TextWrapping="Wrap" Text="{Binding Apps[0].Name,Converter={StaticResource ToUpperCaseConverter}}" FontFamily="Segoe WP Black" FontSize="{Binding Apps[0].Name,Converter={StaticResource ComputeSizeConverter}}" LineHeight="{Binding Apps[0].Name,Converter={StaticResource ComputeSizeConverter},ConverterParameter=lineheight}" LineStackingStrategy="BlockLineHeight" />
					<Image Height="100" Source="{Binding Apps[0].Image}" Stretch="Fill" Width="100" HorizontalAlignment="Left" Margin="10,0,0,0"/>
				</StackPanel>
				<!--Double line list with image placeholder and text wrapping-->
			</controls:PanoramaItem>
		</controls:Panorama>
	</Grid>
</phone:PhoneApplicationPage>
